<?php

namespace bee;
/**
 *
 * @author dzelenika
 *
 */
class button extends widget
{
  /**
   *
   * @var eventDetails
   */
  public $onClickFn;


  function __construct($name, $text, $id = "")
  { parent::__construct($name, $id);
    //echo "--" . $bindValue . "--";
    $this->value = $text;
    $this->widgetType = WIDGET_BUTTON;
  }



  /**
   *
   * @param array $evt
   */
  public function onDraw($evt)
  { //echo "<br />*+*+*+*";
    $this->fillDSDoc();

  }
  /**
   *
   * @param sting $fillVar
   */
  public function fillDSDoc($fillVar = "")
  {
    $__DSDoc = XMLDataHub::getInstance();
    if($fillVar)
    { $__DSDoc->setVariable($fillVar, $this->value);
    }
    //var_dump($this);
    $__DSDoc->setObject("/form/widgets/" . $this->name, $this);
  }

}